package com.simple.business.domain.dto.sms;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserRegisterDTO {
    @NotNull(message = "账号不能为空")
    @Pattern(regexp = "^[A-Za-z0-9]{1,30}$",message = "账号只能包含英文和数字，长度要小于30")
    @ApiModelProperty("账号")
    private String userName;
    @ApiModelProperty("用户名")
    private String nickName;

    @ApiModelProperty("手机号")
    private String mobile;


    @Length(min = 6,max = 16,message = "密码长度必须在6-16之间")
    @NotNull(message = "密码不能为空")
    @ApiModelProperty("密码")
    private String password;
}
